<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
		<center><h1 class="title ui-widget-header ui-corner-all">#{message['mant.detcomprobante.tittle']}</h1></center>
		<h:form id="frmComprobanteForm">
			<p:growl id="message" showDetail="true" />
			
						
			
<p:toolbar>  
<p:toolbarGroup align="left" > 


<p:commandButton value="#{message['rsltd.regresar']}" id="btnregresar"
  action="#{comprobanteSearch.listar}" immediate="true" 
  ajax = "false"  icon="ui-icon-circle-arrow-w" title="#{message['regresar.comprobantes.list']}" />	
  <p:tooltip for="btnregresar"/>
 
  
	<h:panelGrid id="display" columns="2" style="margin-top:30px" >
				<h:outputText value="#{message['mantComprob.codigo']}" />
				<h:panelGroup>
					<p:inputText value="#{comprobanteForm.objComprobanteSie.codcomprobante}" readonly="true" />
				</h:panelGroup>
			</h:panelGrid>
		 	
</p:toolbarGroup>  
</p:toolbar>
			
			
			
			
			
			
			
			
			
			<p:dataTable value="#{comprobanteForm.detComplist}" var="c"
				id="detcomproTable" 
				 emptyMessage="#{message['rsltd.nocencontroregistro']}" resizableColumns="true"  paginatorPosition="bottom"
	   			 paginator="true" rows="10" rowsPerPageTemplate="5,10,15">
				
				<f:facet name="header">
					<h:outputLabel
						value="#{message['lista.detcomprobante.titulo']}" />
				</f:facet>
				
				<p:column headerText="#{message['mantComprob.comprobante']}" style="width:9%" >
					<h:outputText value="#{c.tbComprobante.codcomprobante}" />
				</p:column>
				
				<p:column headerText="#{message['mantComprob.producto']}" >
					<h:outputText value="#{c.tbKardex.tbProducto.descripcionproducto}" />
				</p:column>
				
				<p:column headerText="#{message['mantComprob.cantidad']}" style="width:10%" >
					<h:outputText value="#{c.tbKardex.cantentrada}" />
				</p:column>
				
				<p:column headerText="#{message['mantComprob.valortotal']}" style="width:10%" >
					<h:outputText value="#{c.tbKardex.valortotal}" />
				</p:column>
				
				<p:column headerText="#{message['mantComprob.observacion']}" >
					<h:outputText value="#{c.descripcion}" />
				</p:column>
				
				<p:column headerText="#{message['mantComprob.fechaCreacion']}" style="width:11%" >
					<h:outputText value="#{c.tbKardex.fechaCreacionString}" />
				</p:column>
				
			</p:dataTable>
			
			<h:panelGrid  columns="2" style="margin-top:20px">
				<h:outputText value="#{message['mantComprob.montoTotal']}" />
				<h:panelGroup>
					<p:inputText value="#{comprobanteForm.montoTotal}" readonly="true" />
				</h:panelGroup>
			</h:panelGrid>
		 </h:form>
	</ui:define>
</ui:composition>